HTMLModelElement: currentSrc property
The HTMLModelElement.currentSrc
property contains the URL of the chosen model resource. This will be set when the User Agent selects a model resource based on the accepted file types. The value is an empty string if no src
attribute is present or valid <source>
elements are found.
Value
A string containing the absolute URL of the chosen model source; it will be one of the resources listed by the HTMLSourceElement
contained within the model element, or the value of the src
attribute if no <source>
elements are provided.
Examples
js
const obj = document.createElement("model");
console.log(obj.currentSrc); // ""
Specifications
No specification found
No specification data found for api.HTMLModelElement.currentSrc
.
Check for problems with this page or contribute a missing spec_url
to mdn/browser-compat-data. Also make sure the specification is included in w3c/browser-specs.
Browser compatibility
See also
HTMLModelElement
: Interface used to define theHTMLModelElement.currentSrc
property